package com.ruoyi.web.controller.mall.shopExpressCode.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.web.controller.mall.shopExpressCode.domain.ShopExpressCode;
import com.ruoyi.web.controller.mall.shopExpressCode.service.IShopExpressCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 快递编码Controller
 * 
 * @author ruoyi
 * @date 2021-01-18
 */
@RestController
@RequestMapping("/mall/shopExpressCode")
public class ShopExpressCodeController extends BaseController
{

    @Autowired
    private IShopExpressCodeService shopExpressCodeService;

    /**
     * 查询快递编码列表
     */
//    @RequiresPermissions("mall:shopExpressCode:list")
    @PostMapping("/list")
    public AjaxResult list()
    {
        ShopExpressCode shopExpressCode = new ShopExpressCode();
        shopExpressCode.setDelFlag(0);
        shopExpressCode.setDisabled(0);
        List<ShopExpressCode> list = shopExpressCodeService.selectShopExpressCodeList(shopExpressCode);
        return AjaxResult.success(list);
    }


    /**
     * 新增保存快递编码
     */
//    @RequiresPermissions("mall:shopExpressCode:add")
//    @Log(title = "快递编码", businessType = BusinessType.INSERT)
//    @PostMapping("/add")
//    @ResponseBody
//    public AjaxResult addSave(ShopExpressCode shopExpressCode)
//    {
//        return toAjax(shopExpressCodeService.insertShopExpressCode(shopExpressCode));
//    }

    /**
     * 修改保存快递编码
     */
//    @RequiresPermissions("mall:shopExpressCode:edit")
//    @Log(title = "快递编码", businessType = BusinessType.UPDATE)
//    @PostMapping("/edit")
//    @ResponseBody
//    public AjaxResult editSave(ShopExpressCode shopExpressCode)
//    {
//        return toAjax(shopExpressCodeService.updateShopExpressCode(shopExpressCode));
//    }

}
